**** Replication file ****
*Social Media Effects on Public Trust in the European Union
*Osman Sabri Kiratli
*POQ

************************************************************************************
*** Manuscript
************************************************************************************
****Table-1

**Model-A
logit TRUST_EU i.nuts2 d11 d10 edu c.revqd3_61 TRUST_ONLINE_SO xqd5_9 TRUST_NAT ATTACHMENT_TO__EUROPE SITUATION__NATIONAL_ECONOMY unemp3 revqd3_1_21  revqd3_31 revqd3_41 xqd5_3 xqd5_5 xqd5_6 xqd5_7 xqd5_8 xqd5_10 xqd5_11  , vce(robust)
est sto ra
**Model-1
logit TRUST_EU i.nuts2 d11 d10 edu   c.revqd3_61##c.broadband  , vce(robust)
est sto r1
**Model-2
logit TRUST_EU i.nuts2 d11 d10 edu TRUST_ONLINE_SO xqd5_9 c.revqd3_61##c.broadband TRUST_NAT ATTACHMENT_TO__EUROPE   SITUATION__NATIONAL_ECONOMY unemp3 revqd3_1_21  revqd3_31 revqd3_41 xqd5_3 xqd5_5 xqd5_6 xqd5_7 xqd5_8 xqd5_10 xqd5_11  , vce(robust)
est sto r2
**Model-3
logit TRUST_EU i.nuts2 d11 d10 edu   TRUST_ONLINE_SO##c.broadband  , vce(robust)
est sto r3
**Model-4
logit TRUST_EU i.nuts2 d11 d10 edu c.revqd3_61 xqd5_9 TRUST_ONLINE_SO##c.broadband TRUST_NAT ATTACHMENT_TO__EUROPE SITUATION__NATIONAL_ECONOMY unemp3 revqd3_1_21  revqd3_31 revqd3_41 xqd5_3 xqd5_5 xqd5_6 xqd5_7 xqd5_8 xqd5_10 xqd5_11  , vce(robust)
est sto r4
**Model-5
logit TRUST_EU i.nuts2 d11 d10 edu   xqd5_9##c.broadband  , vce(robust)
est sto r5
**Model-6
logit TRUST_EU i.nuts2 d11 d10 edu c.revqd3_61 TRUST_ONLINE_SO xqd5_9##c.broadband TRUST_NAT ATTACHMENT_TO__EUROPE SITUATION__NATIONAL_ECONOMY unemp3 revqd3_1_21  revqd3_31 revqd3_41 xqd5_3 xqd5_5 xqd5_6 xqd5_7 xqd5_8 xqd5_10 xqd5_11  , vce(robust)
est sto r6

/*Generate user-friendly version of Table 1*/
esttab ra r1 r2 r3 r4 r5 r6, b(3) se(3) star(* 0.05 ** 0.01 *** 0.001) compress nogaps mtitles drop(*.nuts2)

****Figure-1

logit TRUST_EU i.nuts2 d11 d10 edu TRUST_ONLINE_SO xqd5_9 c.revqd3_6##c.broadband  TRUST_NAT ATTACHMENT_TO__EUROPE SITUATION__NATIONAL_ECONOMY unemp3 revqd3_1_2 revqd3_3 revqd3_4 xqd5_3 xqd5_5 xqd5_6 xqd5_7 xqd5_8 xqd5_10 xqd5_11  , nocons vce(robust)
margins, dydx(broadbandnuts )  over (revqd3_6) post
estimates store A

logit TRUST_EU i.nuts2 d11 d10 edu c.revqd3_6 xqd5_9 TRUST_ONLINE_SO##c.broadband  TRUST_NAT ATTACHMENT_TO__EUROPE SITUATION__NATIONAL_ECONOMY unemp3 revqd3_1_2 revqd3_3 revqd3_4 xqd5_3 xqd5_5 xqd5_6 xqd5_7 xqd5_8 xqd5_10 xqd5_11  ,nocons vce(robust)
margins, dydx(broadbandnuts )  over (TRUST_ONLINE_SO) post
estimates store B 

logit TRUST_EU i.nuts2 d11 d10 edu c.revqd3_6 TRUST_ONLINE_SO  xqd5_9##c.broadband  TRUST_NAT ATTACHMENT_TO__EUROPE SITUATION__NATIONAL_ECONOMY unemp3 revqd3_1_2 revqd3_3 revqd3_4 xqd5_3 xqd5_5 xqd5_6 xqd5_7 xqd5_8 xqd5_10 xqd5_11  , nocons vce(robust)
margins, dydx(broadbandnuts )  over (xqd5_9) post
estimates store C


coefplot A B C,xline(0) omitted base

****Figure-2

**Left-panel
logit TRUST_EU i.nuts2 d11 d10 edu TRUST_ONLINE_SO xqd5_9 c.revqd3_61##c.broadband2 TRUST_NAT ATTACHMENT_TO__EUROPE   SITUATION__NATIONAL_ECONOMY unemp3 revqd3_1_21  revqd3_31 revqd3_41 xqd5_3 xqd5_5 xqd5_6 xqd5_7 xqd5_8 xqd5_10 xqd5_11  , vce(robust)
margins, dydx(revqd3_61 ) over(broadband2)
marginsplot

**Middle-panel
logit TRUST_EU i.nuts2 d11 d10 edu c.revqd3_61 xqd5_9 TRUST_ONLINE_SO##c.broadband2 TRUST_NAT ATTACHMENT_TO__EUROPE SITUATION__NATIONAL_ECONOMY unemp3 revqd3_1_21  revqd3_31 revqd3_41 xqd5_3 xqd5_5 xqd5_6 xqd5_7 xqd5_8 xqd5_10 xqd5_11  , vce(robust)
margins, dydx(TRUST_ONLINE_SO ) over(broadband2)
marginsplot

**Right-panel
logit TRUST_EU i.nuts2 d11 d10 edu c.revqd3_61 TRUST_ONLINE_SO xqd5_9##c.broadband2 TRUST_NAT ATTACHMENT_TO__EUROPE SITUATION__NATIONAL_ECONOMY unemp3 revqd3_1_21  revqd3_31 revqd3_41 xqd5_3 xqd5_5 xqd5_6 xqd5_7 xqd5_8 xqd5_10 xqd5_11  , vce(robust)
margins, dydx(xqd5_9 ) over(broadband2)
marginsplot

************************************************************************************
***Supplementary Material 
************************************************************************************

****Table A3
**Model-1
logit TRUST_EU i.nuts2 d11 d10 edu TRUST_ONLINE_SO xqd5_9 c.revqd3_61##c.avgmd  TRUST_NAT ATTACHMENT_TO__EUROPE  SITUATION__NATIONAL_ECONOMY unemp3 revqd3_1_21  revqd3_31 revqd3_41 xqd5_3 xqd5_5 xqd5_6 xqd5_7 xqd5_8 xqd5_10 xqd5_11  , vce(robust)
est sto a31
**Model-2
logit TRUST_EU i.nuts2 d11 d10 edu c.revqd3_61 xqd5_9 TRUST_ONLINE_SO##c.avgmd  TRUST_NAT ATTACHMENT_TO__EUROPE SITUATION__NATIONAL_ECONOMY unemp3 revqd3_1_21  revqd3_31 revqd3_41 xqd5_3 xqd5_5 xqd5_6 xqd5_7 xqd5_8 xqd5_10 xqd5_11  , vce(robust)
est sto a32
**Model-3
logit TRUST_EU i.nuts2 d11 d10 edu c.revqd3_61 TRUST_ONLINE_SO xqd5_9##c.avgmd  TRUST_NAT ATTACHMENT_TO__EUROPE SITUATION__NATIONAL_ECONOMY unemp3 revqd3_1_21  revqd3_31 revqd3_41 xqd5_3 xqd5_5 xqd5_6 xqd5_7 xqd5_8 xqd5_10 xqd5_11  , vce(robust)
est sto a33

/*Generate user-friendly version of Table 1*/
esttab a31 a32 a33, b(3) se(3) star(* 0.05 ** 0.01 *** 0.001) compress nogaps mtitles drop(*.nuts2)

****Table A4
**Model-1
logit TRUST_EU i.nuts2 d11 d10 edu c.revqd3_61 TRUST_ONLINE_SO xqd5_9 TRUST_NAT ATTACHMENT_TO__EUROPE SITUATION__NATIONAL_ECONOMY unemp3 revqd3_1_21  revqd3_31 revqd3_41 revqd3_51 xqd5_3 xqd5_5 xqd5_6 xqd5_7 xqd5_8 xqd5_10 xqd5_11  , vce(robust)
est sto a41
**Model-2
logit TRUST_EU i.nuts2 d11 d10 edu TRUST_ONLINE_SO xqd5_9 c.revqd3_61##c.broadband TRUST_NAT ATTACHMENT_TO__EUROPE   SITUATION__NATIONAL_ECONOMY unemp3 revqd3_1_21  revqd3_31 revqd3_41  revqd3_51 xqd5_3 xqd5_5 xqd5_6 xqd5_7 xqd5_8 xqd5_10 xqd5_11  , vce(robust)
est sto a42
**Model-3
logit TRUST_EU i.nuts2 d11 d10 edu c.revqd3_61 xqd5_9 TRUST_ONLINE_SO##c.broadband TRUST_NAT ATTACHMENT_TO__EUROPE SITUATION__NATIONAL_ECONOMY unemp3 revqd3_1_21  revqd3_31 revqd3_41  revqd3_51 xqd5_3 xqd5_5 xqd5_6 xqd5_7 xqd5_8 xqd5_10 xqd5_11  , vce(robust)
est sto a43
**Model-4
logit TRUST_EU i.nuts2 d11 d10 edu c.revqd3_61 TRUST_ONLINE_SO xqd5_9##c.broadband TRUST_NAT ATTACHMENT_TO__EUROPE SITUATION__NATIONAL_ECONOMY unemp3 revqd3_1_21  revqd3_31 revqd3_41  revqd3_51 xqd5_3 xqd5_5 xqd5_6 xqd5_7 xqd5_8 xqd5_10 xqd5_11  , vce(robust)
est sto a44

/*Generate user-friendly version of Table 1*/
esttab a41 a42 a43 a44, b(3) se(3) star(* 0.05 ** 0.01 *** 0.001) compress nogaps mtitles drop(*.nuts2)

****A5
**Table A4a
factor  qd3_3 qd3_4 qd3_5 qd3_6 qd3_1_2, pcf
rotate
**Table A4b
factor    xqd5_3 xqd5_5 xqd5_6 xqd5_7 xqd5_8 xqd5_9 xqd5_10 xqd5_11 , pcf
rotate

*** Latent Class analysis (note: running these commands will take a LOT of time (>7 hours)
**Table A4c
gsem ( xqd5_3 xqd5_5 xqd5_6 xqd5_7 xqd5_8 xqd5_9 xqd5_10 xqd5_11 <-), logit lclass(C 3)
estat lcmean
estat lcprob
